Conversation
…ions Thread `context.Context` through the git package's public API (`NewRepository`, `NewView`, `NewViewAtRoot`, `NewFileSet`, `NewFileSetAtRoot`) so that `os.UserHomeDir` and `os.Getenv` calls can be replaced with their context-aware equivalents (`env.UserHomeDir`, `env.Get`). This makes home directory and XDG_CONFIG_HOME resolution overridable through context, improving testability. XDG_CONFIG_HOME is resolved once in `newConfig` and stored on the `config` struct, eliminating the previous duplication between `globalGitConfig` and `defaultCoreExcludesFile`. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Commit: 92ac08b
16 interesting tests: 7 KNOWN, 7 SKIP, 2 flaky
Top 20 slowest tests (at least 2 minutes):
|
simonfaltum
left a comment
There was a problem hiding this comment.
[Agent Swarm Review] Verdict: Approved
- 0 Critical
- 0 Major
- 0 Gap (blocking)
- 0 Nit
- 2 Suggestion
See inline comments for details.
|
[Agent Swarm Review] [Gap (Suggestion)] Tests do not verify context-aware env overrides Updated tests pass The Suggestion: Add one focused test that sets |
|
[Agent Swarm Review] [Gap (Suggestion)]
Suggestion: Consider adding a |
Summary
context.Contextthrough thelibs/gitpackage's public API so thatos.UserHomeDirandos.Getenvcalls use context-aware equivalents (env.UserHomeDir,env.Get)XDG_CONFIG_HOMEonce innewConfigand store on theconfigstruct, eliminating duplication betweenglobalGitConfiganddefaultCoreExcludesFile🤖 Generated with Claude Code